Skip to content

Conversation

@iFrozenbyte
Copy link
Collaborator

Add rest layer for Role (added REST + Integration Test) into actually development branch.

Add rest layer for Role (added REST + Integration Test) into actually development branch.

public class SecurityInit extends AbstractSecurityWebApplicationInitializer {
}

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this class here?

}

@RequestMapping("/")
@RequestMapping("/getCat")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is not your functional - shoudn't change localhost:8080/ - for cat - localhost:8080/getCat
localhost:8080/getRole

solid -


@Controller
@RequestMapping("/role")
// localhost:8080/role
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove

import java.util.List;

public interface RoleService {
Role add(Role role);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add java doc

hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect
hibernate.show_sql=true
hibernate.format_sql=true
hibernate.hbm2ddl.auto=update No newline at end of file
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

never do this!

private static final String ALL = "/all";

@Test
public void checkAddRole(){
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you need add tests for all public api methods

public class RoleController {
private RoleService roleService;

@RequestMapping(value = "/add", method = RequestMethod.POST, produces = "application/json;charset=utf-8")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add please update, delete

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants